From feeec3c6cebee6117a2c406b7d1b68860ad88f88 Mon Sep 17 00:00:00 2001 From: "kaf24@viper.(none)" Date: Wed, 9 Mar 2005 22:21:23 +0000 Subject: [PATCH] bitkeeper revision 1.1236.21.2 (422f76e3sErbaCNhhldMjyldFfweSg) Little fixes from Rik van Riel and Anthony Liguori. Signed-off-by: Rik van Riel Signed-off-by: Anthony Liguori Signed-off-by: Keir Fraser --- xen/common/dom0_ops.c | 5 +++-- xen/common/grant_table.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c index 50b59cb419..2bf6f1aaf6 100644 --- a/xen/common/dom0_ops.c +++ b/xen/common/dom0_ops.c @@ -114,7 +114,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op) case DOM0_BUILDDOMAIN: { struct domain *d = find_domain_by_id(op->u.builddomain.domain); - ret = -EINVAL; + ret = -ESRCH; if ( d != NULL ) { ret = final_setup_guest(d, &op->u.builddomain); @@ -147,7 +147,8 @@ long do_dom0_op(dom0_op_t *u_dom0_op) if ( d != NULL ) { ret = -EINVAL; - if ( test_bit(DF_CONSTRUCTED, &d->d_flags) ) + if ( (d != current->domain) && + test_bit(DF_CONSTRUCTED, &d->d_flags) ) { domain_unpause_by_systemcontroller(d); ret = 0; diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index b13ce0c636..c4b72c6257 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -345,7 +345,7 @@ gnttab_map_grant_ref( gnttab_map_grant_ref_t *uop, unsigned int count) { int i, flush = 0; - unsigned long va; + unsigned long va = 0; for ( i = 0; i < count; i++ ) if ( __gnttab_map_grant_ref(&uop[i], &va) == 0) @@ -353,8 +353,9 @@ gnttab_map_grant_ref( if ( flush == 1 ) __flush_tlb_one(va); - else if ( flush ) + else if ( flush != 0 ) local_flush_tlb(); + return 0; } -- 2.30.2